<?php defined('_JEXEC') or die;

jimport('joomla.application.component.modeladmin');

class WebideModelOption extends JModelAdmin {
	public function getItem($pk = null) {
		// load row by id
		$result = parent::getItem($pk);
		return $result;
	}
	public function getForm($data=array(), $loadData=true) {
		// Get the form.
		$form = $this->loadForm('com_webide.option', 'option', array('control' => 'jform', 'load_data' => $loadData));
		// Verify loded form
		if (empty($form)) {
			return false;
		}
		return $form;
	}
	protected function loadFormData() {
		// Check the session for previously entered form data.
		$data = JFactory::getApplication()->getUserState('com_webide.edit.option.data', array());
		if (empty($data)) {
			$data = $this->getItem();
		}
		return $data;
	}
	public function getTable($name = 'Option', $prefix = 'WebideTable', $options = array()){
		return JTable::getInstance($name, $prefix, $options);
	}
	public function save() {
		
	}
}